package com.ming_za.odupdaterserver.core.utils.account.impl;

import com.ming_za.odupdaterserver.core.utils.account.api.LevelValidator;

/**
 * 二进制包含等级检验
 * <code>(userLevel & requiredLevel) == requiredLevel</code>
 */
public class BinaryIncludeValidator implements LevelValidator {
    @Override
    public boolean valid(int userLevel, int requiredLevel) {
        return (userLevel & requiredLevel) == requiredLevel;
    }
}
